 <div  id="footer" class="span-24 last  shadow">
    <?php
    $aCategorie = array();
    foreach ($subCategories as $subCategory):
            $tmp = array();
            $tmp['title'] = $subCategory->title;
            $tmp['id'] =  $subCategory->id;
            $tab[$subCategory->Category->title][] = $tmp;
    endforeach;

    //echo "<pre>" . print_r($tab,1) . "</pre>";die;
    ?>

    <?php if( count($subCategories)>0 ): ?>
    <table cellpadding="10" cellspacing="10">
    <?php
            $i = 0; 
            foreach ($tab as $title => $cat):
                    if($i % 3 == 0) echo "<tr>";
                    echo "<td>";
                    echo "<p class='adstitle'>Annonces " . $title . "</p>";
                    echo "<ul>";
                    foreach($cat as $key => $_cat):
                            echo "<li>". link_to($_cat['title'], '@searchBySubCat?subcat_id=' . $_cat['id'] . '&title=' . Doctrine_Inflector::urlize('annonces '.$_cat['title'])) ."</li>";
                    endforeach;
                    echo "</ul>";
                    echo "</td>";
                    $i++;
                    if($i % 3 == 0) echo "</tr>";
            endforeach;
    ?>
    </table>
    <?php endif; ?>
 </div>
<div id="bg-footer-dz">
</div>
